package com.ruoyi.product.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.product.domain.StoreProduct;
import com.ruoyi.product.domain.StoreProductJoint;
import com.ruoyi.product.domain.StoreProductVerify;
import com.ruoyi.product.mapper.StoreProductJointMapper;
import com.ruoyi.product.mapper.StoreProductVerifyMapper;
import com.ruoyi.product.service.IStoreProductJointService;
import com.ruoyi.product.service.IStoreProductVerifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 商品Service业务层处理
 *
 * @author ruoyi
 * @date 2021-11-22
 */
@Service
public class StoreProductServiceVerifyImpl implements IStoreProductVerifyService
{
    @Autowired
    private StoreProductVerifyMapper storeProductVerifyMapper;


    @Override
    public List<StoreProductVerify> selectStoreProductVerifyByParam(Map<String, Object> params)
    {
        return storeProductVerifyMapper.selectStoreProductVerifyByParam(params);
    }

    /**
     * 新增商品
     *
     * @param
     * @return 结果
     */
    @Override
    public int insertStoreProductVerify(StoreProductVerify storeProductVerify)
    {
        storeProductVerify.setCreateTime(DateUtils.getNowDate());
        return storeProductVerifyMapper.insertStoreProductVerify(storeProductVerify);
    }

    /**
     * 修改
     *
     * @param
     * @return 结果
     */
    @Override
    public int updateStoreProductVerify(StoreProductVerify storeProductVerify)
    {
        storeProductVerify.setUpdateTime(DateUtils.getNowDate());
        return storeProductVerifyMapper.insertStoreProductVerify(storeProductVerify);
    }


}
